package com.gooluke.validation;

import com.gooluke.validation.annotation.AppId;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author gooluke
 * description
 * datetime 2025-05-18 5:25
 */
@RestController
@RequestMapping("/validation")
@Validated
public class ValidationController {

    @RequestMapping("/app/{appId}")
    public String app(@PathVariable("appId") @AppId String appId) {
        System.out.println("appId = " + appId);
        return "success";
    }

}
